package com.example.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
 * 资源映射路径
 */
@Configuration
public class MyWebAppConfigurer implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 将/mystatic/**访问映射到classpath:/mystatic/
        //D:\ProjectTraining\养老服务信息系统\picturefile

        registry.addResourceHandler("/mystatic/**").addResourceLocations("file:C:/images/");

    }
}
